package com.wing.cabinet.model.response;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wing.cabinet.model.entity.StorageInventoryCheck;
import com.wing.cabinet.utils.ExcelExport;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 盘验VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class StorageInventoryCheckVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @ExcelExport(value = "创建时间",sort = 11)
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    @ExcelExport(value = "责任人",sort = 10)
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 存刀任务编号
     */
    @ExcelExport(value = "盘验任务编号",sort = 5)
    private String code;

    /**
     * no
     */
    private Integer no;

    /**
     * day
     */
    private Integer day;

    /**
     * 操作类型
     */
    private StorageInventoryCheck.OperationType operationType;

    /**
    * 操作类型描述
    */
    @TableField(exist = false)
    private String operationTypeDesc;

    public String getOperationTypeDesc() {
        return operationType.getDesc();
    }

    /**
     * 业务类型
     */
    @ExcelExport(value = "存储性质",sort = 9,kv = "temp-暂存;repair-报修;recycle-报废")
    private StorageInventoryCheck.BusinessType businessType;

    /**
    * 业务类型描述
    */
    @TableField(exist = false)
    private String businessTypeDesc;

    public String getBusinessTypeDesc() {
        return businessType.getDesc();
    }

    /**
     * 状态
     */
    @ExcelExport(value = "盘验状态",sort = 12,kv = "created-待盘验;checked-已盘验")
    private StorageInventoryCheck.Status status;

    /**
    * 状态描述
    */
    @TableField(exist = false)
    private String statusDesc;

    public String getStatusDesc() {
        return status.getDesc();
    }

    /**
     * 盘验时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime checkTime;

    /**
     * 盘验人id
     */
    private Long checkUserId;

    /**
     * 盘验人
     */
    private String checkUserName;

    /**
     * 通知时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime notifyTime;

    /**
     * 通知人
     */
    private Long notifyUserId;

    /**
     * 通知人
     */
    private String notifyUserName;

    /**
     * 回收人id
     */
    private Long takeUserId;

    /**
     * 回收人
     */
    private String takeUserName;

    /**
     * 回收时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime takeTime;

    /**
     * 盘验完操作类型
     */
    private Integer operationTypeChecked;

    /**
     * 盘验完业务类型
     */
    private Integer businessTypeChecked;

    /**
     * 签收人id
     */
    private String signUserId;

    /**
     * 签收时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime signTime;

    /**
     * 签收人
     */
    private String signUserName;

    /**
     * 盘验结果id
     */
    private Long checkedResultId;

    /**
     * 通知供应商id
     */
    private Long supplierId;

    /**
     * 通知供应商
     */
    private String supplierName;

    /**
     * 企业id
     */
    private Long companyId;

    /**
     * 是否已同步：no(0,未同步);yes(1,已同步);
     */
    private Integer isSyns;

    /**
     * 同步时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime synsTime;

    /**
     * 设备编号
     */
    private String deviceCode;

    /**
     * 盘验：0：否，1：是
     */
    private Boolean isCheck;

    /**
     * supplierCompanyId
     */
    private Long supplierCompanyId;

    /**
     * 姓名
     */
    private String creatorNickname;

    @ExcelExport(value = "柜子编号",sort = 6)
    private String cabCode;

    @ExcelExport(value = "货位编号",sort = 7)
    private String spaceCode;

    private Long cabId;

    private Long spaceId;

    @ExcelExport(value = "数量",sort = 8)
    private Integer quantity;

    //@ExcelExport(value = "物料名称",sort = 1)
    private String skuName;

    //@ExcelExport(value = "物料编号",sort = 2)
    private String skuCode;

    private String skuSpec;

    //@ExcelExport(value = "规格码",sort = 3)
    private String skuSpecOld;
   /* @ExcelExport(value = "品牌",sort = 4)
    private String productBrandName;*/

    private StorageInventoryCheck.BusinessDetailType businessDetailType;

    /**
     * 企业编码
     */
    private String enterpriseCode;

    /**
     * 是否以旧换新
     */
    private String isTradeIn;

    /**
     * 所属企业
     */
    private String enterpriseName;

    /**
     * 车间名称
     */
    private String workshopName;

    /**
     * 车间描述
     */
    private String workshopDesc;

}
